<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wallet_orders', function (Blueprint $table) {
            $table->increments('id');
            $table->string('sn',30);
            $table->tinyInteger('pay_type')->comment('1支付宝2微信');
            $table->tinyInteger('pay_status')->comment('1已支付0未支付')->default(0);
            $table->timestamp("pay_time");
            $table->integer('user_id')->nullable()->comment('用户id');
            $table->integer('order_status')->nullable()->comment('1已完成0未完成');
            $table->integer('add_type')->nullable()->comment('1转入,2转出,3兑换');
            $table->integer('s_blog_id')->nullable()->comment('转账账户');
            $table->decimal('price', 11)->nullable()->comment('金额');
            $table->integer('e_blog_id')->nullable()->comment('到达账户');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('wallet_orders');
    }
}
